package chapter10;

/**
 * Java7新增的多异常捕获
 */
public class MultiExceptionTest {
    public static void main(String[] args) {
        try {
            int a = Integer.parseInt(args[0]);
            int b = Integer.parseInt(args[1]);
            int c = a / b;
        } catch (IndexOutOfBoundsException | NumberFormatException
        |ArithmeticException ie) {
            System.out.println("程序发生了越界、数字格式、算术异常之一");
        }
    }
}
